package com.ccdc.lbcmsystem.mapper;

import com.ccdc.lbcmsystem.pojo.Children;
import org.apache.ibatis.annotations.Mapper;
import org.springframework.stereotype.Component;
import org.springframework.web.bind.annotation.RequestParam;

import java.util.List;


@Mapper
@Component
public interface ChildrenMapper {
    //查询所有用户
    List<Children> queryChildrenList();
    //通过姓名来进行查询
    List<Children> queryListChildrenByName(@RequestParam("name") String name);
    //新增留守儿童
    int addChildren(@RequestParam("children") Children children);
    //根据ID查询留守儿童信息
    Children queryChildrenById(@RequestParam("id") Integer id);
    //根据ID删除留守儿童信息
    int delChildrenById(@RequestParam("id") Integer id,@RequestParam("deleteStatus") Integer deleteStatus);
    //根据ID修改信息
    int updateChildrenById(@RequestParam("id") Integer id,@RequestParam("name") String name,
                           @RequestParam("phone") String phone,@RequestParam("birthday") String birthday,
                       @RequestParam("age") Integer age,@RequestParam("school") String school,
                        @RequestParam("address") String address,@RequestParam("guardian") String guardian,
                           @RequestParam("guardianPhone") String guardianPhone,@RequestParam("healthCondition") String healthCondition,
                           @RequestParam("health") Integer health,@RequestParam("familyStatus") Integer familyStatus);
}
